import { myLogin, getUserBaseInfo, getEmployeeBaseInfo } from './user.js'
import { getDepartments, addDepartments, delDepartments, getDepartmentsById, updateDepartment } from './departments.js'
import {
  getEmployeesSimple, delEmployee, addEmployee, getEmployeeList, importEmployee,
  saveUserDetailById, getPersonalDetail, updatePersonal, getJobDetail, updateJob,
  assignRoles
} from './employees.js'
import { getCompanyId, getRoles, addRole, updateRole, getRoleDetail, deleteRole } from './setting.js'
import { getPermissionList, addPermission, updatePermission, delPermission, getPermissionDetail, assignPerm } from './permission.js'

export const myLoginAPI = myLogin
export const getDepartmentsAPI = getDepartments
export const getEmployeesSimpleAPI = getEmployeesSimple
export const addDepartmentsAPI = addDepartments
export const delDepartmentsAPI = delDepartments
export const getDepartmentsByIdAPI = getDepartmentsById
export const updateDepartmentAPI = updateDepartment
export const getCompanyIdAPI = getCompanyId
export const getRolesAPI = getRoles
export const addRoleAPI = addRole
export const updateRoleAPI = updateRole
export const getRoleDetailAPI = getRoleDetail
export const deleteRoleAPI = deleteRole
export const delEmployeeAPI = delEmployee
export const addEmployeeAPI = addEmployee
export const getEmployeeListAPI = getEmployeeList
export const importEmployeeAPI = importEmployee
export const saveUserDetailByIdAPI = saveUserDetailById
export const getUserBaseInfoAPI = getUserBaseInfo
export const getEmployeeBaseInfoAPI = getEmployeeBaseInfo
export const getPersonalDetailAPI = getPersonalDetail
export const updatePersonalAPI = updatePersonal
export const getJobDetailAPI = getJobDetail
export const updateJobAPI = updateJob
export const getPermissionListAPI = getPermissionList
export const addPermissionAPI = addPermission
export const updatePermissionAPI = updatePermission
export const delPermissionAPI = delPermission
export const getPermissionDetailAPI = getPermissionDetail
export const assignRolesAPI = assignRoles
export const assignPermAPI = assignPerm

/*
# 请求方式和传参
    - 请求方式有哪些 ?
    get, put, delete, post, patch
    - 后端restful请求规范
请求方式和增删改查一一对一
    请求路径  请求方式  含义             传参(请求头) 传参(请求体) 传参(地址栏url)
    /user    get      获取用户列表       token  ?   page=1&pagesize=10(查询字符串)
    /user/1  get      获取id为1的用户    token  /   1(动态传参)
    /user    post     新增用户           token    { username: 'zs' } (json格式)
    /user/1  delete   删除id为1的用户    token  /   1(动态传参)
    /user/1  put      修改id为1的用户    token    { username: 'zs' } (json格式)/1(动态传参)
*/
